﻿using System.Configuration;
using System.Data.SqlClient;

namespace Pantry.DataAccess
{
    public sealed class SqlConnectionTool
    {
        private static readonly string SqlConnectionString = ConfigurationManager.ConnectionStrings["SqlConnection"].ConnectionString;

        public static SqlConnection SqlGetConnection()
        {
            return new SqlConnection(SqlConnectionString);
        }
        public static SqlConnection SqlGetConnection(string connection)
        {
            return new SqlConnection(connection);
        }
        public static string SqlGetConnectionString()
        {
            return SqlConnectionString;
        }
        private SqlConnectionTool() { }


    }
}
